1. Field of the Invention
The present invention relates to a device driver for controlling a device connected to a bus, and a device supplied with electric power from the bus.
2. Description of Related Art
Conventionally, a bus for connecting a peripheral device is provided in a main body of a personal computer or the like. A device driver for controlling the peripheral device connected to the bus is incorporated in the main body. Furthermore, in recent years, a universal serial bus (hereafter referred to as USB) has become a standard interface of personal computers.
A plurality of devices (hereafter referred to as USB devices) can be connected to the USB. In low power USB devices among such USB devices, devices (bus power device) supplied with electric power from the USB also exist.
As the USB spreads, however, the proportion of USB devices to devices connected to personal computers is increasing. The number of USB devices connected to each personal computer is also increasing. In some cases, therefore, the total power consumption of a USB device exceeds permissible supplied electric power of the USB provided in the personal computer. In such a case, in order to avoid imposing an abnormal load on the personal computer, there is adopted in the USB a scheme in which each USB device is caused to notify the bus of power consumption beforehand and the USB device is brought into a forced use suspension (disable) state when its power consumption cannot be satisfied with the permissible supplied electric power.
Recently, however, USB devices are being adopted in devices each having a battery, such as portable telephones, as well. In such a USB device having a battery, not only electric power for operation of an electronic circuit but also electric power for charging the battery is supplied from the USB. Such a USB device causing largely different power consumption at the time of operation and having a plurality of functions typically notifies the bus side of power consumption in a function causing the greatest power consumption. Even in the case where only the operation of the electronic circuit is necessary, therefore, the USB device requests more electric power than is necessary from the host, often resulting in the forced use suspension (disable) state.
There is also a USB device of such in which power consumption is switched from function to function and a notice to that effect is sent to the bus side. When switching to a function causing large power consumption is effected, however, the USB device falls into a forced use suspension (disable) state in some cases.
Once the USB device falls into such a forced use suspension (disable) state, thereafter the USB device cannot be used at all, unless reconnection of the USB device is conducted. Therefore, it becomes necessary for the user to operate the USB device carefully so as to prevent the USB device from falling into the forced use suspension (disable) state, resulting in a troublesome operation.
This problem occurs not only in USB buses but also in arbitrary buses each capable of being connected to a plurality of devices and supplying electric power to the devices.